package com.gopay.common.domain.aggregatepayment;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * @author Chenyu Li
 * @description 聚合支付门店信息表
 * @date 2017/12/29
 * Copyright (c) 2017. www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "AP_SHOP_INFO")
public class ApShopInfo extends BaseEntity {
    private String shopId;
    private String traId;
    private String mctNo;
    private String shopNo;
    private String shopName;
    private String shopFullName;
    private String cityId;
    private String shopProvinceCode;
    private String shopCityCode;
    private String shopCountryCode;
    private String shopAddr;
    private String tel;
    private String shopPicUrl;
    private String shopEnvirPicUrl;
    private String cashierPicUrl;
    private String openId;
    private String openKey;
    private String status;
    private String custId;
    private Date createdTs;
    private Date lastUpdTs;
    private int version;
    private String custName;
    private String custAbbreviation;
    private String shopPicThumbUrl;
    private String shopEnvirPicThumbUrl;
    private String cashierPicThumbUrl;
    private String lastUpdOprId;
    private String pic1;
    private String pic2;
    private String pic3;


    @Basic
    @Column(name = "SHOP_PIC_THUMB_URL", nullable = true, length = 100)
    public String getShopPicThumbUrl() {
        return shopPicThumbUrl;
    }

    public void setShopPicThumbUrl(String shopPicThumbUrl) {
        this.shopPicThumbUrl = shopPicThumbUrl;
    }

    @Basic
    @Column(name = "SHOP_ENVIR_PIC_THUMB_URL", nullable = true, length = 100)
    public String getShopEnvirPicThumbUrl() {
        return shopEnvirPicThumbUrl;
    }

    public void setShopEnvirPicThumbUrl(String shopEnvirPicThumbUrl) {
        this.shopEnvirPicThumbUrl = shopEnvirPicThumbUrl;
    }

    @Basic
    @Column(name = "CASHIER_PIC_THUMB_URL", nullable = true, length = 100)
    public String getCashierPicThumbUrl() {
        return cashierPicThumbUrl;
    }

    public void setCashierPicThumbUrl(String cashierPicThumbUrl) {
        this.cashierPicThumbUrl = cashierPicThumbUrl;
    }

    @Basic
    @Column(name = "LAST_UPD_OPR_ID", nullable = true, length = 20)
    public String getLastUpdOprId() {
        return lastUpdOprId;
    }

    public void setLastUpdOprId(String lastUpdOprId) {
        this.lastUpdOprId = lastUpdOprId;
    }

    @Basic
    @Column(name = "CUST_NAME", nullable = true, length = 100)
    public String getCustName() {
        return custName;
    }

    public void setCustName(String custName) {
        this.custName = custName;
    }

    @Basic
    @Column(name = "CUST_ABBREVIATION", nullable = true, length = 100)
    public String getCustAbbreviation() {
        return custAbbreviation;
    }

    public void setCustAbbreviation(String custAbbreviation) {
        this.custAbbreviation = custAbbreviation;
    }

    @Id
    @Column(name = "SHOP_ID", nullable = false)
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    @Basic
    @Column(name = "TRA_ID", nullable = true, length = 12)
    public String getTraId() {
        return traId;
    }

    public void setTraId(String traId) {
        this.traId = traId;
    }

    @Basic
    @Column(name = "CUST_ID", nullable = true, length = 20)
    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    @Basic
    @Column(name = "MCT_NO", nullable = true, length = 20)
    public String getMctNo() {
        return mctNo;
    }

    public void setMctNo(String mctNo) {
        this.mctNo = mctNo;
    }

    @Basic
    @Column(name = "SHOP_NO", nullable = true, length = 20)
    public String getShopNo() {
        return shopNo;
    }

    public void setShopNo(String shopNo) {
        this.shopNo = shopNo;
    }

    @Basic
    @Column(name = "SHOP_NAME", nullable = true, length = 100)
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    @Basic
    @Column(name = "SHOP_FULL_NAME", nullable = true, length = 100)
    public String getShopFullName() {
        return shopFullName;
    }

    public void setShopFullName(String shopFullName) {
        this.shopFullName = shopFullName;
    }

    @Basic
    @Column(name = "CITY_ID", nullable = true, length = 6)
    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    @Basic
    @Column(name = "SHOP_PROVINCE_CODE", nullable = true, length = 20)
    public String getShopProvinceCode() {
        return shopProvinceCode;
    }

    public void setShopProvinceCode(String shopProvinceCode) {
        this.shopProvinceCode = shopProvinceCode;
    }

    @Basic
    @Column(name = "SHOP_CITY_CODE", nullable = true, length = 20)
    public String getShopCityCode() {
        return shopCityCode;
    }

    public void setShopCityCode(String shopCityCode) {
        this.shopCityCode = shopCityCode;
    }

    @Basic
    @Column(name = "SHOP_COUNTRY_CODE", nullable = true, length = 20)
    public String getShopCountryCode() {
        return shopCountryCode;
    }

    public void setShopCountryCode(String shopCountryCode) {
        this.shopCountryCode = shopCountryCode;
    }

    @Basic
    @Column(name = "SHOP_ADDR", nullable = true, length = 200)
    public String getShopAddr() {
        return shopAddr;
    }

    public void setShopAddr(String shopAddr) {
        this.shopAddr = shopAddr;
    }

    @Basic
    @Column(name = "TEL", nullable = true, length = 50)
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @Basic
    @Column(name = "SHOP_PIC_URL", nullable = true, length = 100)
    public String getShopPicUrl() {
        return shopPicUrl;
    }

    public void setShopPicUrl(String shopPicUrl) {
        this.shopPicUrl = shopPicUrl;
    }

    @Basic
    @Column(name = "SHOP_ENVIR_PIC_URL", nullable = true, length = 100)
    public String getShopEnvirPicUrl() {
        return shopEnvirPicUrl;
    }

    public void setShopEnvirPicUrl(String shopEnvirPicUrl) {
        this.shopEnvirPicUrl = shopEnvirPicUrl;
    }

    @Basic
    @Column(name = "CASHIER_PIC_URL", nullable = true, length = 100)
    public String getCashierPicUrl() {
        return cashierPicUrl;
    }

    public void setCashierPicUrl(String cashierPicUrl) {
        this.cashierPicUrl = cashierPicUrl;
    }

    @Basic
    @Column(name = "OPEN_ID", nullable = true, length = 32)
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "OPEN_KEY", nullable = true, length = 32)
    public String getOpenKey() {
        return openKey;
    }

    public void setOpenKey(String openKey) {
        this.openKey = openKey;
    }

    @Basic
    @Column(name = "STATUS", nullable = true, length = 1)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "CREATED_TS", nullable = true)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Basic
    @Column(name = "LAST_UPD_TS", nullable = true)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Basic
    @Column(name = "VERSION", nullable = true, precision = 0)
    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Basic
    @Column(name = "PIC1", nullable = true, length = 200)
    public String getPic1() {
        return pic1;
    }

    public void setPic1(String pic1) {
        this.pic1 = pic1;
    }

    @Basic
    @Column(name = "PIC2", nullable = true, length = 200)
    public String getPic2() {
        return pic2;
    }

    public void setPic2(String pic2) {
        this.pic2 = pic2;
    }

    @Basic
    @Column(name = "PIC3", nullable = true, length = 200)
    public String getPic3() {
        return pic3;
    }

    public void setPic3(String pic3) {
        this.pic3 = pic3;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ApShopInfo that = (ApShopInfo) o;

        if (version != that.version) {
            return false;
        }
        if (shopId != null ? !shopId.equals(that.shopId) : that.shopId != null) {
            return false;
        }
        if (traId != null ? !traId.equals(that.traId) : that.traId != null) {
            return false;
        }
        if (custId != null ? !custId.equals(that.custId) : that.custId != null) {
            return false;
        }
        if (mctNo != null ? !mctNo.equals(that.mctNo) : that.mctNo != null) {
            return false;
        }
        if (shopNo != null ? !shopNo.equals(that.shopNo) : that.shopNo != null) {
            return false;
        }
        if (shopName != null ? !shopName.equals(that.shopName) : that.shopName != null) {
            return false;
        }
        if (shopFullName != null ? !shopFullName.equals(that.shopFullName) : that.shopFullName != null) {
            return false;
        }
        if (cityId != null ? !cityId.equals(that.cityId) : that.cityId != null) {
            return false;
        }
        if (shopProvinceCode != null ? !shopProvinceCode.equals(that.shopProvinceCode) : that.shopProvinceCode != null) {
            return false;
        }
        if (shopCityCode != null ? !shopCityCode.equals(that.shopCityCode) : that.shopCityCode != null) {
            return false;
        }
        if (shopCountryCode != null ? !shopCountryCode.equals(that.shopCountryCode) : that.shopCountryCode != null) {
            return false;
        }
        if (shopAddr != null ? !shopAddr.equals(that.shopAddr) : that.shopAddr != null) {
            return false;
        }
        if (tel != null ? !tel.equals(that.tel) : that.tel != null) {
            return false;
        }
        if (shopPicUrl != null ? !shopPicUrl.equals(that.shopPicUrl) : that.shopPicUrl != null) {
            return false;
        }
        if (shopEnvirPicUrl != null ? !shopEnvirPicUrl.equals(that.shopEnvirPicUrl) : that.shopEnvirPicUrl != null) {
            return false;
        }
        if (cashierPicUrl != null ? !cashierPicUrl.equals(that.cashierPicUrl) : that.cashierPicUrl != null) {
            return false;
        }
        if (openId != null ? !openId.equals(that.openId) : that.openId != null) {
            return false;
        }
        if (openKey != null ? !openKey.equals(that.openKey) : that.openKey != null) {
            return false;
        }
        if (status != null ? !status.equals(that.status) : that.status != null) {
            return false;
        }
        if (createdTs != null ? !createdTs.equals(that.createdTs) : that.createdTs != null) {
            return false;
        }
        if (lastUpdTs != null ? !lastUpdTs.equals(that.lastUpdTs) : that.lastUpdTs != null) {
            return false;
        }
        if (custName != null ? !custName.equals(that.custName) : that.custName != null) {
            return false;
        }
        if (custAbbreviation != null ? !custAbbreviation.equals(that.custAbbreviation) : that.custAbbreviation != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = shopId != null ? shopId.hashCode() : 0;
        result = 31 * result + (traId != null ? traId.hashCode() : 0);
        result = 31 * result + (custName != null ? custName.hashCode() : 0);
        result = 31 * result + (custAbbreviation != null ? custAbbreviation.hashCode() : 0);
        result = 31 * result + (custId != null ? custId.hashCode() : 0);
        result = 31 * result + (mctNo != null ? mctNo.hashCode() : 0);
        result = 31 * result + (shopNo != null ? shopNo.hashCode() : 0);
        result = 31 * result + (shopName != null ? shopName.hashCode() : 0);
        result = 31 * result + (shopFullName != null ? shopFullName.hashCode() : 0);
        result = 31 * result + (cityId != null ? cityId.hashCode() : 0);
        result = 31 * result + (shopProvinceCode != null ? shopProvinceCode.hashCode() : 0);
        result = 31 * result + (shopCityCode != null ? shopCityCode.hashCode() : 0);
        result = 31 * result + (shopCountryCode != null ? shopCountryCode.hashCode() : 0);
        result = 31 * result + (shopAddr != null ? shopAddr.hashCode() : 0);
        result = 31 * result + (tel != null ? tel.hashCode() : 0);
        result = 31 * result + (shopPicUrl != null ? shopPicUrl.hashCode() : 0);
        result = 31 * result + (shopEnvirPicUrl != null ? shopEnvirPicUrl.hashCode() : 0);
        result = 31 * result + (cashierPicUrl != null ? cashierPicUrl.hashCode() : 0);
        result = 31 * result + (openId != null ? openId.hashCode() : 0);
        result = 31 * result + (openKey != null ? openKey.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createdTs != null ? createdTs.hashCode() : 0);
        result = 31 * result + (lastUpdTs != null ? lastUpdTs.hashCode() : 0);
        result = 31 * result + version;
        return result;
    }
}
